# SPDX-License-Identifier: GPL-2.0
KERNEL_DIR = /lib/modules/$(shell uname -r)/build
PROJECT_DIR := $(shell pwd)

ccflags-y += -I/root/StudyLinux/kernel_src/nvme_host

obj-m += nvme.o
nvme-objs += pci.o

obj-m += nvme-core.o
nvme-core-objs += core.o ioctl.o sysfs.o pr.o
nvme-core-objs += trace.o
nvme-core-objs += zns.o
# nvme-core-objs += constants.o
# nvme-core-objs += multipath.o
# nvme-core-objs += fault_inject.o
# nvme-core-objs += hwmon.o
# nvme-core-objs += auth.o

obj-m += nvme-fabrics.o
nvme-fabrics-objs += fabrics.o

obj-m += nvme-rdma.o
nvme-rdma-y += rdma.o

obj-m += nvme-fc.o
nvme-fc-objs += fc.o

obj-m += nvme-tcp.o
nvme-tcp-objs += tcp.o

all:
	$(MAKE) -C $(KERNEL_DIR) M=$(PROJECT_DIR) modules
clean:
	$(MAKE) -C $(KERNEL_DIR) M=$(PROJECT_DIR) clean
